Integrand size = 21, antiderivative size = 108 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {4 \text {arctanh}(\cos (c+d x))}{a^4 d}-\frac {\cot (c+d x)}{a^4 d}-\frac {2 \cot (c+d x)}{5 a^4 d (1+\csc (c+d x))^3}+\frac {31 \cot (c+d x)}{15 a^4 d (1+\csc (c+d x))^2}-\frac {104 \cot (c+d x)}{15 a^4 d (1+\csc (c+d x))} \]
4*arctanh(cos(d*x+c))/a^4/d-94/15*cot(d*x+c)/a^4/d+2/5*cot(d*x+c)/a^4/d/(1 +sin(d*x+c))^3+13/15*cot(d*x+c)/a^4/d/(1+sin(d*x+c))^2+4*cot(d*x+c)/a^4/d/ (1+sin(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(315\) vs. \(2(108)=216\).
Time = 0.74 (sec) , antiderivative size = 315, normalized size of antiderivative = 2.92 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (24 \sin \left (\frac {1}{2} (c+d x)\right )-12 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+76 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2-38 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3+316 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4-15 \cot \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5+120 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5-120 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5+15 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{30 d (a+a \sin (c+d x))^4} \]
((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3*(24*Sin[(c + d*x)/2] - 12*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 76*Sin[(c + d*x)/2]*(Cos[(c + d*x)/2] + S in[(c + d*x)/2])^2 - 38*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^3 + 316*Sin[ (c + d*x)/2]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4 - 15*Cot[(c + d*x)/2] *(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^5 + 120*Log[Cos[(c + d*x)/2]]*(Cos[ (c + d*x)/2] + Sin[(c + d*x)/2])^5 - 120*Log[Sin[(c + d*x)/2]]*(Cos[(c + d *x)/2] + Sin[(c + d*x)/2])^5 + 15*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^5* Tan[(c + d*x)/2]))/(30*d*(a + a*Sin[c + d*x])^4)
Time = 0.49 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3188, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(c+d x)}{(a \sin (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (c+d x)^2 (a \sin (c+d x)+a)^4}dx\) |
\(\Big \downarrow \) 3188 |
\(\displaystyle \frac {\int \left (\frac {\csc ^2(c+d x)}{a^2}-\frac {4 \csc (c+d x)}{a^2}-\frac {16}{a^2 (\csc (c+d x)+1)}+\frac {9}{a^2}+\frac {9}{a^2 (\csc (c+d x)+1)^2}-\frac {2}{a^2 (\csc (c+d x)+1)^3}\right )dx}{a^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {4 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {104 \cot (c+d x)}{15 a^2 d (\csc (c+d x)+1)}+\frac {31 \cot (c+d x)}{15 a^2 d (\csc (c+d x)+1)^2}-\frac {2 \cot (c+d x)}{5 a^2 d (\csc (c+d x)+1)^3}}{a^2}\) |
((4*ArcTanh[Cos[c + d*x]])/(a^2*d) - Cot[c + d*x]/(a^2*d) - (2*Cot[c + d*x ])/(5*a^2*d*(1 + Csc[c + d*x])^3) + (31*Cot[c + d*x])/(15*a^2*d*(1 + Csc[c + d*x])^2) - (104*Cot[c + d*x])/(15*a^2*d*(1 + Csc[c + d*x])))/a^2
3.1.88.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_ ), x_Symbol] :> Simp[a^p Int[ExpandIntegrand[Sin[e + f*x]^p*((a + b*Sin[e + f*x])^(m - p/2)/(a - b*Sin[e + f*x])^(p/2)), x], x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p/2] && (LtQ[p, 0] || GtQ[m - p/2, 0])
Time = 11.11 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.10
method | result | size |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {16}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {88}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {28}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {36}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{4}}\) | \(119\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {16}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {88}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {28}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {36}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{4}}\) | \(119\) |
risch | \(-\frac {4 \left (-320 \,{\mathrm e}^{4 i \left (d x +c \right )}+150 i {\mathrm e}^{5 i \left (d x +c \right )}+367 \,{\mathrm e}^{2 i \left (d x +c \right )}-385 i {\mathrm e}^{3 i \left (d x +c \right )}-47+205 i {\mathrm e}^{i \left (d x +c \right )}+30 \,{\mathrm e}^{6 i \left (d x +c \right )}\right )}{15 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{5} a^{4} d}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{4} d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{4} d}\) | \(148\) |
1/2/d/a^4*(tan(1/2*d*x+1/2*c)-1/tan(1/2*d*x+1/2*c)-8*ln(tan(1/2*d*x+1/2*c) )-32/5/(tan(1/2*d*x+1/2*c)+1)^5+16/(tan(1/2*d*x+1/2*c)+1)^4-88/3/(tan(1/2* d*x+1/2*c)+1)^3+28/(tan(1/2*d*x+1/2*c)+1)^2-36/(tan(1/2*d*x+1/2*c)+1))
Leaf count of result is larger than twice the leaf count of optimal. 369 vs. \(2 (102) = 204\).
Time = 0.29 (sec) , antiderivative size = 369, normalized size of antiderivative = 3.42 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {94 \, \cos \left (d x + c\right )^{4} + 222 \, \cos \left (d x + c\right )^{3} - 115 \, \cos \left (d x + c\right )^{2} + 30 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) - 4\right )} \sin \left (d x + c\right ) + 2 \, \cos \left (d x + c\right ) + 4\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) - 4\right )} \sin \left (d x + c\right ) + 2 \, \cos \left (d x + c\right ) + 4\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (94 \, \cos \left (d x + c\right )^{3} - 128 \, \cos \left (d x + c\right )^{2} - 243 \, \cos \left (d x + c\right ) - 6\right )} \sin \left (d x + c\right ) - 237 \, \cos \left (d x + c\right ) + 6}{15 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} - 2 \, a^{4} d \cos \left (d x + c\right )^{3} - 5 \, a^{4} d \cos \left (d x + c\right )^{2} + 2 \, a^{4} d \cos \left (d x + c\right ) + 4 \, a^{4} d - {\left (a^{4} d \cos \left (d x + c\right )^{3} + 3 \, a^{4} d \cos \left (d x + c\right )^{2} - 2 \, a^{4} d \cos \left (d x + c\right ) - 4 \, a^{4} d\right )} \sin \left (d x + c\right )\right )}} \]
1/15*(94*cos(d*x + c)^4 + 222*cos(d*x + c)^3 - 115*cos(d*x + c)^2 + 30*(co s(d*x + c)^4 - 2*cos(d*x + c)^3 - 5*cos(d*x + c)^2 - (cos(d*x + c)^3 + 3*c os(d*x + c)^2 - 2*cos(d*x + c) - 4)*sin(d*x + c) + 2*cos(d*x + c) + 4)*log (1/2*cos(d*x + c) + 1/2) - 30*(cos(d*x + c)^4 - 2*cos(d*x + c)^3 - 5*cos(d *x + c)^2 - (cos(d*x + c)^3 + 3*cos(d*x + c)^2 - 2*cos(d*x + c) - 4)*sin(d *x + c) + 2*cos(d*x + c) + 4)*log(-1/2*cos(d*x + c) + 1/2) + (94*cos(d*x + c)^3 - 128*cos(d*x + c)^2 - 243*cos(d*x + c) - 6)*sin(d*x + c) - 237*cos( d*x + c) + 6)/(a^4*d*cos(d*x + c)^4 - 2*a^4*d*cos(d*x + c)^3 - 5*a^4*d*cos (d*x + c)^2 + 2*a^4*d*cos(d*x + c) + 4*a^4*d - (a^4*d*cos(d*x + c)^3 + 3*a ^4*d*cos(d*x + c)^2 - 2*a^4*d*cos(d*x + c) - 4*a^4*d)*sin(d*x + c))
\[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} + 4 \sin ^{3}{\left (c + d x \right )} + 6 \sin ^{2}{\left (c + d x \right )} + 4 \sin {\left (c + d x \right )} + 1}\, dx}{a^{4}} \]
Integral(cot(c + d*x)**2/(sin(c + d*x)**4 + 4*sin(c + d*x)**3 + 6*sin(c + d*x)**2 + 4*sin(c + d*x) + 1), x)/a**4
Leaf count of result is larger than twice the leaf count of optimal. 288 vs. \(2 (102) = 204\).
Time = 0.20 (sec) , antiderivative size = 288, normalized size of antiderivative = 2.67 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {\frac {\frac {491 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {1690 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2570 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {1815 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {555 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 15}{\frac {a^{4} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {10 \, a^{4} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {10 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {5 \, a^{4} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {120 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4}} - \frac {15 \, \sin \left (d x + c\right )}{a^{4} {\left (\cos \left (d x + c\right ) + 1\right )}}}{30 \, d} \]
-1/30*((491*sin(d*x + c)/(cos(d*x + c) + 1) + 1690*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 2570*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 1815*sin(d*x + c )^4/(cos(d*x + c) + 1)^4 + 555*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 15)/( a^4*sin(d*x + c)/(cos(d*x + c) + 1) + 5*a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 10*a^4*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 10*a^4*sin(d*x + c)^4 /(cos(d*x + c) + 1)^4 + 5*a^4*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + a^4*si n(d*x + c)^6/(cos(d*x + c) + 1)^6) + 120*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^4 - 15*sin(d*x + c)/(a^4*(cos(d*x + c) + 1)))/d
Time = 0.37 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.25 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=-\frac {\frac {120 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{4}} - \frac {15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{4}} - \frac {15 \, {\left (8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {4 \, {\left (135 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 435 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 605 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 385 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 104\right )}}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{30 \, d} \]
-1/30*(120*log(abs(tan(1/2*d*x + 1/2*c)))/a^4 - 15*tan(1/2*d*x + 1/2*c)/a^ 4 - 15*(8*tan(1/2*d*x + 1/2*c) - 1)/(a^4*tan(1/2*d*x + 1/2*c)) + 4*(135*ta n(1/2*d*x + 1/2*c)^4 + 435*tan(1/2*d*x + 1/2*c)^3 + 605*tan(1/2*d*x + 1/2* c)^2 + 385*tan(1/2*d*x + 1/2*c) + 104)/(a^4*(tan(1/2*d*x + 1/2*c) + 1)^5)) /d
Time = 11.47 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.88 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^4\,d}-\frac {37\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+121\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {514\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {338\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {491\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{15}+1}{d\,\left (2\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+20\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+20\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+10\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^4\,d} \]
tan(c/2 + (d*x)/2)/(2*a^4*d) - ((491*tan(c/2 + (d*x)/2))/15 + (338*tan(c/2 + (d*x)/2)^2)/3 + (514*tan(c/2 + (d*x)/2)^3)/3 + 121*tan(c/2 + (d*x)/2)^4 + 37*tan(c/2 + (d*x)/2)^5 + 1)/(d*(10*a^4*tan(c/2 + (d*x)/2)^2 + 20*a^4*t an(c/2 + (d*x)/2)^3 + 20*a^4*tan(c/2 + (d*x)/2)^4 + 10*a^4*tan(c/2 + (d*x) /2)^5 + 2*a^4*tan(c/2 + (d*x)/2)^6 + 2*a^4*tan(c/2 + (d*x)/2))) - (4*log(t an(c/2 + (d*x)/2)))/(a^4*d)